<html>
<head><meta charset="utf-8"><title>tricks for faster compiler compilation times · t-compiler · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/index.html">t-compiler</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/tricks.20for.20faster.20compiler.20compilation.20times.html">tricks for faster compiler compilation times</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="156617649"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/tricks%20for%20faster%20compiler%20compilation%20times/near/156617649" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/tricks.20for.20faster.20compiler.20compilation.20times.html#156617649">(Jan 22 2019 at 16:26)</a>:</h4>
<p>I wanted to know some trick to make compilation times faster when working on the compiler and what's the explanation for each of those</p>



<a name="156617671"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/tricks%20for%20faster%20compiler%20compilation%20times/near/156617671" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/tricks.20for.20faster.20compiler.20compilation.20times.html#156617671">(Jan 22 2019 at 16:26)</a>:</h4>
<p>maybe we should document those? I've asked <span class="user-mention" data-user-id="116009">@nikomatsakis</span> several times and keep forgeting</p>



<a name="156617675"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/tricks%20for%20faster%20compiler%20compilation%20times/near/156617675" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/tricks.20for.20faster.20compiler.20compilation.20times.html#156617675">(Jan 22 2019 at 16:26)</a>:</h4>
<p>so my usual compilation command is ...</p>



<a name="156617687"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/tricks%20for%20faster%20compiler%20compilation%20times/near/156617687" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/tricks.20for.20faster.20compiler.20compilation.20times.html#156617687">(Jan 22 2019 at 16:26)</a>:</h4>
<p><code>./x.py build -i --stage 1 src/libstd</code></p>



<a name="156617706"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/tricks%20for%20faster%20compiler%20compilation%20times/near/156617706" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/tricks.20for.20faster.20compiler.20compilation.20times.html#156617706">(Jan 22 2019 at 16:27)</a>:</h4>
<p>then there's a little trick which is</p>



<a name="156617708"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/tricks%20for%20faster%20compiler%20compilation%20times/near/156617708" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/tricks.20for.20faster.20compiler.20compilation.20times.html#156617708">(Jan 22 2019 at 16:27)</a>:</h4>
<p><code>./x.py build -i --stage 1 --keep-stage 1 src/libstd</code></p>



<a name="156617724"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/tricks%20for%20faster%20compiler%20compilation%20times/near/156617724" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/tricks.20for.20faster.20compiler.20compilation.20times.html#156617724">(Jan 22 2019 at 16:27)</a>:</h4>
<p>/me uses a widely known trick of a-lot-of-cores.</p>



<a name="156617730"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/tricks%20for%20faster%20compiler%20compilation%20times/near/156617730" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/tricks.20for.20faster.20compiler.20compilation.20times.html#156617730">(Jan 22 2019 at 16:27)</a>:</h4>
<p>:D</p>



<a name="156617795"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/tricks%20for%20faster%20compiler%20compilation%20times/near/156617795" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/tricks.20for.20faster.20compiler.20compilation.20times.html#156617795">(Jan 22 2019 at 16:28)</a>:</h4>
<p>I've seen Niko use <code>./x.py check</code> but in cases where compilation fails it's telling me that everything is ok</p>



<a name="156617809"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/tricks%20for%20faster%20compiler%20compilation%20times/near/156617809" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/tricks.20for.20faster.20compiler.20compilation.20times.html#156617809">(Jan 22 2019 at 16:28)</a>:</h4>
<p>can someone explain those two commands and what check exactly does?</p>



<a name="156617829"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/tricks%20for%20faster%20compiler%20compilation%20times/near/156617829" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/tricks.20for.20faster.20compiler.20compilation.20times.html#156617829">(Jan 22 2019 at 16:28)</a>:</h4>
<p>I guess I can take the compromise to push something to rustc guides in exchange ;)</p>



<a name="156617868"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/tricks%20for%20faster%20compiler%20compilation%20times/near/156617868" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/tricks.20for.20faster.20compiler.20compilation.20times.html#156617868">(Jan 22 2019 at 16:29)</a>:</h4>
<p>well <code>--stage 1</code> relates to bootstrapping. Since to fully bootstrap a compiler you need to compile it twice over, there’s a lot of unnecessary time spent compiling a kind-of unnecessary compiler as far as local development goes.</p>



<a name="156617878"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/tricks%20for%20faster%20compiler%20compilation%20times/near/156617878" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/tricks.20for.20faster.20compiler.20compilation.20times.html#156617878">(Jan 22 2019 at 16:29)</a>:</h4>
<p><code>check</code> is the equivalent of <code>cargo check</code>. It just type checks your code but doesn't actually build anything</p>



<a name="156617879"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/tricks%20for%20faster%20compiler%20compilation%20times/near/156617879" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/tricks.20for.20faster.20compiler.20compilation.20times.html#156617879">(Jan 22 2019 at 16:29)</a>:</h4>
<p>so <code>--stage=1</code> makes it compile only once.</p>



<a name="156617895"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/tricks%20for%20faster%20compiler%20compilation%20times/near/156617895" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/tricks.20for.20faster.20compiler.20compilation.20times.html#156617895">(Jan 22 2019 at 16:29)</a>:</h4>
<p>As I understand it, check doesn't run codegen, just type check and borrow check. I'm not sure if <a href="https://github.com/rust-lang/rust/issues/52565" target="_blank" title="https://github.com/rust-lang/rust/issues/52565">#52565</a> has been fixed though - stopping me from using check.</p>



<a name="156617970"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/tricks%20for%20faster%20compiler%20compilation%20times/near/156617970" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/tricks.20for.20faster.20compiler.20compilation.20times.html#156617970">(Jan 22 2019 at 16:30)</a>:</h4>
<p>I also use <span class="user-mention" data-user-id="123586">@nagisa</span>'s lots of cores technique though.</p>



<a name="156617978"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/tricks%20for%20faster%20compiler%20compilation%20times/near/156617978" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/tricks.20for.20faster.20compiler.20compilation.20times.html#156617978">(Jan 22 2019 at 16:30)</a>:</h4>
<blockquote>
<p>well <code>--stage 1</code> relates to bootstrapping. Since to fully bootstrap a compiler you need to compile it twice over, there’s a lot of unnecessary time spent compiling a kind-of unnecessary compiler as far as local development goes.</p>
</blockquote>
<p>yeah, that's the part I know :)</p>



<a name="156617984"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/tricks%20for%20faster%20compiler%20compilation%20times/near/156617984" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/tricks.20for.20faster.20compiler.20compilation.20times.html#156617984">(Jan 22 2019 at 16:30)</a>:</h4>
<p><code>--keep-stage=1</code> meanwhile avoids invalidating/rebuilding some artifacts that would otherwise be invalidated and rebuilt unnecessarily.</p>



<a name="156617997"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/tricks%20for%20faster%20compiler%20compilation%20times/near/156617997" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/tricks.20for.20faster.20compiler.20compilation.20times.html#156617997">(Jan 22 2019 at 16:30)</a>:</h4>
<p>(again, for local development purposes)</p>



<a name="156618003"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/tricks%20for%20faster%20compiler%20compilation%20times/near/156618003" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/tricks.20for.20faster.20compiler.20compilation.20times.html#156618003">(Jan 22 2019 at 16:30)</a>:</h4>
<blockquote>
<p><code>check</code> is the equivalent of <code>cargo check</code>. It just type checks your code but doesn't actually build anything</p>
</blockquote>
<p>for some reason <code>build</code> fails and <code>check</code> pass so my guess is that's not exactly true? in a couple of tries I did</p>



<a name="156618032"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/tricks%20for%20faster%20compiler%20compilation%20times/near/156618032" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/tricks.20for.20faster.20compiler.20compilation.20times.html#156618032">(Jan 22 2019 at 16:31)</a>:</h4>
<blockquote>
<blockquote>
<p><code>check</code> is the equivalent of <code>cargo check</code>. It just type checks your code but doesn't actually build anything</p>
</blockquote>
<p>for some reason <code>build</code> fails and <code>check</code> pass so my guess is that's not exactly true?</p>
</blockquote>
<p>That generally shouldn't happen. What is the build failing with?</p>



<a name="156618051"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/tricks%20for%20faster%20compiler%20compilation%20times/near/156618051" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/tricks.20for.20faster.20compiler.20compilation.20times.html#156618051">(Jan 22 2019 at 16:31)</a>:</h4>
<p><code>-i</code> enables incremental compilation. and <code>src/libstd</code> makes <code>libstd</code> the build target. Normally (with <code>src/libstd</code> being absent) there’s more stuff to be built afterwards, but not that much.</p>



<a name="156618065"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/tricks%20for%20faster%20compiler%20compilation%20times/near/156618065" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/tricks.20for.20faster.20compiler.20compilation.20times.html#156618065">(Jan 22 2019 at 16:32)</a>:</h4>
<blockquote>
<blockquote>
<blockquote>
<p><code>check</code> is the equivalent of <code>cargo check</code>. It just type checks your code but doesn't actually build anything</p>
</blockquote>
<p>for some reason <code>build</code> fails and <code>check</code> pass so my guess is that's not exactly true?</p>
</blockquote>
<p>That generally shouldn't happen. What is the build failing with?</p>
</blockquote>
<p>ahh maybe is because of what <span class="user-mention" data-user-id="116107">@davidtwco</span> have said <a href="https://github.com/rust-lang/rust/issues/52565" target="_blank" title="https://github.com/rust-lang/rust/issues/52565">https://github.com/rust-lang/rust/issues/52565</a></p>



<a name="156618130"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/tricks%20for%20faster%20compiler%20compilation%20times/near/156618130" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/tricks.20for.20faster.20compiler.20compilation.20times.html#156618130">(Jan 22 2019 at 16:32)</a>:</h4>
<blockquote>
<p><code>--keep-stage=1</code> meanwhile avoids invalidating/rebuilding some artifacts that would otherwise be invalidated and rebuilt unnecessarily.</p>
</blockquote>
<p>What confuses me is the combination of <code>--stage 1</code> and <code>--keep-stage=1</code>. That reads to me like nothing would be compiled.</p>



<a name="156618157"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/tricks%20for%20faster%20compiler%20compilation%20times/near/156618157" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/tricks.20for.20faster.20compiler.20compilation.20times.html#156618157">(Jan 22 2019 at 16:32)</a>:</h4>
<p>Oh, I think <code>cargo</code> has the same issue.</p>



<a name="156618160"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/tricks%20for%20faster%20compiler%20compilation%20times/near/156618160" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/tricks.20for.20faster.20compiler.20compilation.20times.html#156618160">(Jan 22 2019 at 16:32)</a>:</h4>
<p><a href="https://github.com/rust-lang/rust/issues/52565" target="_blank" title="https://github.com/rust-lang/rust/issues/52565">#52565</a> wouldn't make a <code>x.py build</code> fail where an <code>x.py check</code> didn't, I don't think.</p>



<a name="156618193"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/tricks%20for%20faster%20compiler%20compilation%20times/near/156618193" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/tricks.20for.20faster.20compiler.20compilation.20times.html#156618193">(Jan 22 2019 at 16:33)</a>:</h4>
<p>Generally, I do <code>./x.py check</code> until it all compiles and I'm ready to test it and then I do <code>./x.py build --stage 1</code></p>



<a name="156618199"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/tricks%20for%20faster%20compiler%20compilation%20times/near/156618199" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/tricks.20for.20faster.20compiler.20compilation.20times.html#156618199">(Jan 22 2019 at 16:33)</a>:</h4>
<blockquote>
<blockquote>
<p><code>--keep-stage=1</code> meanwhile avoids invalidating/rebuilding some artifacts that would otherwise be invalidated and rebuilt unnecessarily.</p>
</blockquote>
<p>What confuses me is the combination of <code>--stage 1</code> and <code>--keep-stage=1</code>. That reads to me like nothing would be compiled.</p>
</blockquote>
<p>yeah, I remember seeing <span class="user-mention" data-user-id="116009">@nikomatsakis</span> and <span class="user-mention" data-user-id="116015">@Alex Crichton</span> discussing about this and believe me that makes sense, it's just that doesn't read nicely :)</p>



<a name="156618203"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/tricks%20for%20faster%20compiler%20compilation%20times/near/156618203" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/tricks.20for.20faster.20compiler.20compilation.20times.html#156618203">(Jan 22 2019 at 16:33)</a>:</h4>
<p>currently for me, check and incremental collide a bit: after a check everything is rebuilt</p>



<a name="156618266"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/tricks%20for%20faster%20compiler%20compilation%20times/near/156618266" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/tricks.20for.20faster.20compiler.20compilation.20times.html#156618266">(Jan 22 2019 at 16:34)</a>:</h4>
<p>I generally develop compiler by running <code>x.py --stage 1 test src/test/whateversuiteisappropriate</code> and going to do my thing meanwhile</p>



<a name="156618271"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/tricks%20for%20faster%20compiler%20compilation%20times/near/156618271" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/tricks.20for.20faster.20compiler.20compilation.20times.html#156618271">(Jan 22 2019 at 16:34)</a>:</h4>
<p>I guess <code>--keep-stage=1</code> means "keep the dependencies for stage 1"?</p>



<a name="156618275"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/tricks%20for%20faster%20compiler%20compilation%20times/near/156618275" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/tricks.20for.20faster.20compiler.20compilation.20times.html#156618275">(Jan 22 2019 at 16:34)</a>:</h4>
<blockquote>
<p><code>-i</code> enables incremental compilation. and <code>src/libstd</code> makes <code>libstd</code> the build target. Normally (with <code>src/libstd</code> being absent) there’s more stuff to be built afterwards, but not that much.</p>
</blockquote>
<p>yeah, also knew about -i, so passing <code>src/libstd</code> avoids compiling something? what would that be?</p>



<a name="156618278"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/tricks%20for%20faster%20compiler%20compilation%20times/near/156618278" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/tricks.20for.20faster.20compiler.20compilation.20times.html#156618278">(Jan 22 2019 at 16:34)</a>:</h4>
<p>Not "keep the results of stage 1"</p>



<a name="156618499"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/tricks%20for%20faster%20compiler%20compilation%20times/near/156618499" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/tricks.20for.20faster.20compiler.20compilation.20times.html#156618499">(Jan 22 2019 at 16:37)</a>:</h4>
<p>At some point <code>--stage=1</code> meant something else.</p>



<a name="156618510"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/tricks%20for%20faster%20compiler%20compilation%20times/near/156618510" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/tricks.20for.20faster.20compiler.20compilation.20times.html#156618510">(Jan 22 2019 at 16:37)</a>:</h4>
<p>and then <code>--keep-stage</code> made more sense.</p>



<a name="156618651"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/tricks%20for%20faster%20compiler%20compilation%20times/near/156618651" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> dlrobertson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/tricks.20for.20faster.20compiler.20compilation.20times.html#156618651">(Jan 22 2019 at 16:39)</a>:</h4>
<p>Along the lines of the many cores trick. Has anyone tried compiling rust with sccache?</p>



<a name="156618674"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/tricks%20for%20faster%20compiler%20compilation%20times/near/156618674" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/tricks.20for.20faster.20compiler.20compilation.20times.html#156618674">(Jan 22 2019 at 16:39)</a>:</h4>
<blockquote>
<blockquote>
<blockquote>
<p><code>check</code> is the equivalent of <code>cargo check</code>. It just type checks your code but doesn't actually build anything</p>
</blockquote>
<p>for some reason <code>build</code> fails and <code>check</code> pass so my guess is that's not exactly true?</p>
</blockquote>
<p>That generally shouldn't happen. What is the build failing with?</p>
</blockquote>
<div class="codehilite"><pre><span></span>[santiago@archlinux rust2 (place2b)]$ RUST_BACKTRACE=full ./x.py check -i --stage 1 --keep-stage 1 src/libstd
Updating only changed submodules
Submodules updated in 0.04 seconds
    Finished dev [unoptimized] target(s) in 0.50s
Checking std artifacts (x86_64-unknown-linux-gnu -&gt; x86_64-unknown-linux-gnu)
    Finished release [optimized] target(s) in 0.35s
Build completed successfully in 0:00:02
[santiago@archlinux rust2 (place2b)]$ RUST_BACKTRACE=full ./x.py build -i --stage 1 --keep-stage 1 src/libstd
Updating only changed submodules
Submodules updated in 0.03 seconds
    Finished dev [unoptimized] target(s) in 0.28s
Building stage0 std artifacts (x86_64-unknown-linux-gnu -&gt; x86_64-unknown-linux-gnu)
    Finished release [optimized] target(s) in 0.33s
Copying stage0 std from stage0 (x86_64-unknown-linux-gnu -&gt; x86_64-unknown-linux-gnu / x86_64-unknown-linux-gnu)
Building stage0 test artifacts (x86_64-unknown-linux-gnu -&gt; x86_64-unknown-linux-gnu)
    Finished release [optimized] target(s) in 0.29s
Copying stage0 test from stage0 (x86_64-unknown-linux-gnu -&gt; x86_64-unknown-linux-gnu / x86_64-unknown-linux-gnu)
Building stage0 compiler artifacts (x86_64-unknown-linux-gnu -&gt; x86_64-unknown-linux-gnu)
   Compiling rustc_mir v0.0.0 (/home/santiago/src/oss/rust2/src/librustc_mir)
   Compiling rustc_allocator v0.0.0 (/home/santiago/src/oss/rust2/src/librustc_allocator)
   Compiling rustc_lint v0.0.0 (/home/santiago/src/oss/rust2/src/librustc_lint)
   Compiling rustc_traits v0.0.0 (/home/santiago/src/oss/rust2/src/librustc_traits)
   Compiling rustc_resolve v0.0.0 (/home/santiago/src/oss/rust2/src/librustc_resolve)
   Compiling rustc_plugin v0.0.0 (/home/santiago/src/oss/rust2/src/librustc_plugin)
error[E0614]: type `rustc::mir::Local` cannot be dereferenced=&gt;      ] 115/127: rustc_mir, rustc_traits, rustc_resolve, rustc_plugin
   --&gt; src/librustc_mir/borrow_check/place_ext.rs:100:74
    |
100 |                         let ignore = !has_storage_dead_or_moved.contains(*index) &amp;&amp;
    |                                                                          ^^^^^^

error[E0614]: type `rustc::mir::Local` cannot be dereferenced
   --&gt; src/librustc_mir/borrow_check/place_ext.rs:101:45
    |
101 |                             mir.local_decls[*index].mutability == Mutability::Not;
    |                                             ^^^^^^

   Compiling rustc_privacy v0.0.0 (/home/santiago/src/oss/rust2/src/librustc_privacy)
error: aborting due to 2 previous errors========================&gt;    ] 119/127: rustc_mir

For more information about this error, try `rustc --explain E0614`.
error: Could not compile `rustc_mir`.

To learn more, run the command again with --verbose.
command did not execute successfully: &quot;/home/santiago/src/oss/rust2/build/x86_64-unknown-linux-gnu/stage0/bin/cargo&quot; &quot;build&quot; &quot;--target&quot; &quot;x86_64-unknown-linux-gnu&quot; &quot;-j&quot; &quot;4&quot; &quot;--release&quot; &quot;--features&quot; &quot;&quot; &quot;--manifest-path&quot; &quot;/home/santiago/src/oss/rust2/src/rustc/Cargo.toml&quot; &quot;--message-format&quot; &quot;json&quot;
expected success, got: exit code: 101
failed to run: /home/santiago/src/oss/rust2/build/bootstrap/debug/bootstrap build -i --stage 1 --keep-stage 1 src/libstd
Build completed unsuccessfully in 0:00:14
</pre></div>



<a name="156618675"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/tricks%20for%20faster%20compiler%20compilation%20times/near/156618675" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> dlrobertson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/tricks.20for.20faster.20compiler.20compilation.20times.html#156618675">(Jan 22 2019 at 16:39)</a>:</h4>
<p>I thought I remember reading that Firefox uses it for compiling the rust crates used there</p>



<a name="156618752"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/tricks%20for%20faster%20compiler%20compilation%20times/near/156618752" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/tricks.20for.20faster.20compiler.20compilation.20times.html#156618752">(Jan 22 2019 at 16:40)</a>:</h4>
<p>I'd love to have a diagram showing the interactions between <code>--stage x</code> and <code>--keep-stage=y</code>. As it is, I never use <code>--keep-stage</code> because I don't really understand what it's keeping and therefore when I can or can't use it.</p>



<a name="156618765"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/tricks%20for%20faster%20compiler%20compilation%20times/near/156618765" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> QuietMisdreavus <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/tricks.20for.20faster.20compiler.20compilation.20times.html#156618765">(Jan 22 2019 at 16:40)</a>:</h4>
<p>i think that the travis builders use sccache for llvm?</p>



<a name="156618841"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/tricks%20for%20faster%20compiler%20compilation%20times/near/156618841" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/tricks.20for.20faster.20compiler.20compilation.20times.html#156618841">(Jan 22 2019 at 16:41)</a>:</h4>
<blockquote>
<p>./x.py check -i --stage 1 --keep-stage 1</p>
</blockquote>
<p>That looks kind of suspicious to me. Do you get the same error if you just run <code>./x.py check -i --stage 1</code>?</p>



<a name="156618926"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/tricks%20for%20faster%20compiler%20compilation%20times/near/156618926" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/tricks.20for.20faster.20compiler.20compilation.20times.html#156618926">(Jan 22 2019 at 16:42)</a>:</h4>
<div class="codehilite"><pre><span></span>[santiago@archlinux rust2 (place2b)]$ RUST_BACKTRACE=full ./x.py check -i --stage 1 src/libstd
Updating only changed submodules
Submodules updated in 0.04 seconds
    Finished dev [unoptimized] target(s) in 0.31s
Checking std artifacts (x86_64-unknown-linux-gnu -&gt; x86_64-unknown-linux-gnu)
    Finished release [optimized] target(s) in 0.34s
Build completed successfully in 0:00:02
</pre></div>



<a name="156618929"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/tricks%20for%20faster%20compiler%20compilation%20times/near/156618929" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/tricks.20for.20faster.20compiler.20compilation.20times.html#156618929">(Jan 22 2019 at 16:42)</a>:</h4>
<p>it shouldn't build but builds</p>



<a name="156618971"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/tricks%20for%20faster%20compiler%20compilation%20times/near/156618971" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/tricks.20for.20faster.20compiler.20compilation.20times.html#156618971">(Jan 22 2019 at 16:43)</a>:</h4>
<p>I need to remove <code>-i</code></p>



<a name="156618974"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/tricks%20for%20faster%20compiler%20compilation%20times/near/156618974" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/tricks.20for.20faster.20compiler.20compilation.20times.html#156618974">(Jan 22 2019 at 16:43)</a>:</h4>
<p>The error is in <code>librustc_mir</code> which I wouldn't expect to be built when you ask for <code>src/libstd</code></p>



<a name="156618981"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/tricks%20for%20faster%20compiler%20compilation%20times/near/156618981" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/tricks.20for.20faster.20compiler.20compilation.20times.html#156618981">(Jan 22 2019 at 16:43)</a>:</h4>
<p>well removing <code>-i</code> still builds</p>



<a name="156618982"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/tricks%20for%20faster%20compiler%20compilation%20times/near/156618982" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/tricks.20for.20faster.20compiler.20compilation.20times.html#156618982">(Jan 22 2019 at 16:43)</a>:</h4>
<p>Oh it works when you remove <code>-i</code>?</p>



<a name="156618992"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/tricks%20for%20faster%20compiler%20compilation%20times/near/156618992" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/tricks.20for.20faster.20compiler.20compilation.20times.html#156618992">(Jan 22 2019 at 16:43)</a>:</h4>
<p>Try  just <code>./x.py check --stage 1</code></p>



<a name="156618993"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/tricks%20for%20faster%20compiler%20compilation%20times/near/156618993" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/tricks.20for.20faster.20compiler.20compilation.20times.html#156618993">(Jan 22 2019 at 16:43)</a>:</h4>
<p>no no, it still compiles</p>



<a name="156619057"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/tricks%20for%20faster%20compiler%20compilation%20times/near/156619057" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Zoxc <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/tricks.20for.20faster.20compiler.20compilation.20times.html#156619057">(Jan 22 2019 at 16:44)</a>:</h4>
<p>What is the error you get?</p>



<a name="156619065"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/tricks%20for%20faster%20compiler%20compilation%20times/near/156619065" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/tricks.20for.20faster.20compiler.20compilation.20times.html#156619065">(Jan 22 2019 at 16:44)</a>:</h4>
<p>fwiw, <code>-i</code> is prone to break as the compiler structures get changed</p>



<a name="156619078"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/tricks%20for%20faster%20compiler%20compilation%20times/near/156619078" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/tricks.20for.20faster.20compiler.20compilation.20times.html#156619078">(Jan 22 2019 at 16:44)</a>:</h4>
<p><span class="user-mention" data-user-id="116466">@Zoxc</span> running <code>build</code> gives an error and <code>check</code> is fine</p>



<a name="156619091"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/tricks%20for%20faster%20compiler%20compilation%20times/near/156619091" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/tricks.20for.20faster.20compiler.20compilation.20times.html#156619091">(Jan 22 2019 at 16:44)</a>:</h4>
<blockquote>
<blockquote>
<blockquote>
<blockquote>
<p><code>check</code> is the equivalent of <code>cargo check</code>. It just type checks your code but doesn't actually build anything</p>
</blockquote>
<p>for some reason <code>build</code> fails and <code>check</code> pass so my guess is that's not exactly true?</p>
</blockquote>
<p>That generally shouldn't happen. What is the build failing with?</p>
</blockquote>
</blockquote>
<p>[santiago@archlinux rust2 (place2b)]$ RUST_BACKTRACE=full ./x.py check -i --stage 1 --keep-stage 1 src/libstd<br>
Updating only changed submodules<br>
Submodules updated in 0.04 seconds<br>
    Finished dev [unoptimized] target(s) in 0.50s<br>
Checking std artifacts (x86_64-unknown-linux-gnu -&gt; x86_64-unknown-linux-gnu)<br>
    Finished release [optimized] target(s) in 0.35s<br>
Build completed successfully in 0:00:02<br>
[santiago@archlinux rust2 (place2b)]$ RUST_BACKTRACE=full ./x.py build -i --stage 1 --keep-stage 1 src/libstd<br>
Updating only changed submodules<br>
Submodules updated in 0.03 seconds<br>
    Finished dev [unoptimized] target(s) in 0.28s<br>
Building stage0 std artifacts (x86_64-unknown-linux-gnu -&gt; x86_64-unknown-linux-gnu)<br>
    Finished release [optimized] target(s) in 0.33s<br>
Copying stage0 std from stage0 (x86_64-unknown-linux-gnu -&gt; x86_64-unknown-linux-gnu / x86_64-unknown-linux-gnu)<br>
Building stage0 test artifacts (x86_64-unknown-linux-gnu -&gt; x86_64-unknown-linux-gnu)<br>
    Finished release [optimized] target(s) in 0.29s<br>
Copying stage0 test from stage0 (x86_64-unknown-linux-gnu -&gt; x86_64-unknown-linux-gnu / x86_64-unknown-linux-gnu)<br>
Building stage0 compiler artifacts (x86_64-unknown-linux-gnu -&gt; x86_64-unknown-linux-gnu)<br>
   Compiling rustc_mir v0.0.0 (/home/santiago/src/oss/rust2/src/librustc_mir)<br>
   Compiling rustc_allocator v0.0.0 (/home/santiago/src/oss/rust2/src/librustc_allocator)<br>
   Compiling rustc_lint v0.0.0 (/home/santiago/src/oss/rust2/src/librustc_lint)<br>
   Compiling rustc_traits v0.0.0 (/home/santiago/src/oss/rust2/src/librustc_traits)<br>
   Compiling rustc_resolve v0.0.0 (/home/santiago/src/oss/rust2/src/librustc_resolve)<br>
   Compiling rustc_plugin v0.0.0 (/home/santiago/src/oss/rust2/src/librustc_plugin)<br>
error[E0614]: type <code>rustc::mir::Local</code> cannot be dereferenced=&gt;      ] 115/127: rustc_mir, rustc_traits, rustc_resolve, rustc_plugin                                          <br>
   --&gt; src/librustc_mir/borrow_check/place_ext.rs:100:74<br>
    |<br>
100 |                         let ignore = !has_storage_dead_or_moved.contains(*index) &amp;&amp;<br>
    |                                                                          ^^^^^^</p>
<p>error[E0614]: type <code>rustc::mir::Local</code> cannot be dereferenced<br>
   --&gt; src/librustc_mir/borrow_check/place_ext.rs:101:45<br>
    |<br>
101 |                             mir.local_decls[*index].mutability == Mutability::Not;<br>
    |                                             ^^^^^^</p>
<p>Compiling rustc_privacy v0.0.0 (/home/santiago/src/oss/rust2/src/librustc_privacy)<br>
error: aborting due to 2 previous errors========================&gt;    ] 119/127: rustc_mir                                                                                     </p>
<p>For more information about this error, try <code>rustc --explain E0614</code>.<br>
error: Could not compile <code>rustc_mir</code>.</p>
<p>To learn more, run the command again with --verbose.<br>
command did not execute successfully: "/home/santiago/src/oss/rust2/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "build" "--target" "x86_64-unknown-linux-gnu" "-j" "4" "--release" "--features" "" "--manifest-path" "/home/santiago/src/oss/rust2/src/rustc/Cargo.toml" "--message-format" "json"<br>
expected success, got: exit code: 101<br>
failed to run: /home/santiago/src/oss/rust2/build/bootstrap/debug/bootstrap build -i --stage 1 --keep-stage 1 src/libstd<br>
Build completed unsuccessfully in 0:00:14</p>
<div class="codehilite"><pre><span></span>
</pre></div>


<p><span class="user-mention" data-user-id="116466">@Zoxc</span> ^^^</p>



<a name="156619161"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/tricks%20for%20faster%20compiler%20compilation%20times/near/156619161" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Zoxc <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/tricks.20for.20faster.20compiler.20compilation.20times.html#156619161">(Jan 22 2019 at 16:45)</a>:</h4>
<p>That is fine though. If <code>x.py check</code> fails, so should <code>x.py build</code>, not the other way around. <code>x.py check</code> checks fewer things than <code>x.py build</code></p>



<a name="156619237"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/tricks%20for%20faster%20compiler%20compilation%20times/near/156619237" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Zoxc <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/tricks.20for.20faster.20compiler.20compilation.20times.html#156619237">(Jan 22 2019 at 16:46)</a>:</h4>
<p><code>-i</code> is not prone to break as compiler structures change. It can however break due to hash collisions</p>



<a name="156619300"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/tricks%20for%20faster%20compiler%20compilation%20times/near/156619300" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/tricks.20for.20faster.20compiler.20compilation.20times.html#156619300">(Jan 22 2019 at 16:47)</a>:</h4>
<blockquote>
<p><code>-i</code> is not prone to break as compiler structures change. It can however break due to hash collisions</p>
</blockquote>
<p>/me shrugs and notes down to try -i again sometime</p>



<a name="156619363"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/tricks%20for%20faster%20compiler%20compilation%20times/near/156619363" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Zoxc <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/tricks.20for.20faster.20compiler.20compilation.20times.html#156619363">(Jan 22 2019 at 16:48)</a>:</h4>
<p><span class="user-mention" data-user-id="116266">@Santiago Pastorino</span> Do <code>x.py clean</code> and try again <code>x.py build</code> and <code>x.py check</code> again without using <code>--keep-stage</code></p>



<a name="156619415"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/tricks%20for%20faster%20compiler%20compilation%20times/near/156619415" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/tricks.20for.20faster.20compiler.20compilation.20times.html#156619415">(Jan 22 2019 at 16:48)</a>:</h4>
<p><span class="emoji emoji-1f44d" title="+1">:+1:</span></p>



<a name="156619422"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/tricks%20for%20faster%20compiler%20compilation%20times/near/156619422" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/tricks.20for.20faster.20compiler.20compilation.20times.html#156619422">(Jan 22 2019 at 16:49)</a>:</h4>
<p>takes ages though :)</p>



<a name="156619450"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/tricks%20for%20faster%20compiler%20compilation%20times/near/156619450" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/tricks.20for.20faster.20compiler.20compilation.20times.html#156619450">(Jan 22 2019 at 16:49)</a>:</h4>
<p>one of the tricks I know I should apply is to buy a new machine ;)</p>



<a name="156619473"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/tricks%20for%20faster%20compiler%20compilation%20times/near/156619473" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Zoxc <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/tricks.20for.20faster.20compiler.20compilation.20times.html#156619473">(Jan 22 2019 at 16:49)</a>:</h4>
<p>I want one of AMD's new 12 cores =P</p>



<a name="156619551"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/tricks%20for%20faster%20compiler%20compilation%20times/near/156619551" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/tricks.20for.20faster.20compiler.20compilation.20times.html#156619551">(Jan 22 2019 at 16:50)</a>:</h4>
<p>/me wants one of AMD’s new 64-cores...</p>



<a name="156619572"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/tricks%20for%20faster%20compiler%20compilation%20times/near/156619572" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/tricks.20for.20faster.20compiler.20compilation.20times.html#156619572">(Jan 22 2019 at 16:50)</a>:</h4>
<p>I was looking to something a bit simpler :), going after Systems76 Galago Pro probably with 32GB</p>



<a name="156619604"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/tricks%20for%20faster%20compiler%20compilation%20times/near/156619604" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/tricks.20for.20faster.20compiler.20compilation.20times.html#156619604">(Jan 22 2019 at 16:51)</a>:</h4>
<p>By the way there is a <a href="https://cfarm.tetaneutral.net/munin/gccfarm/gcc68/index.html" target="_blank" title="https://cfarm.tetaneutral.net/munin/gccfarm/gcc68/index.html">2700 on the GCC Farm</a>, you could play with it and try how it feels before making a decision.</p>



<a name="156619687"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/tricks%20for%20faster%20compiler%20compilation%20times/near/156619687" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/tricks.20for.20faster.20compiler.20compilation.20times.html#156619687">(Jan 22 2019 at 16:52)</a>:</h4>
<p>For a few months I've been using a dedicated server for my Rust development with a "AMD Ryzen 7 1700X (16) @ 3.400GHz", 64GB of RAM and a 512GB SSD - mostly for the convenience of being able to jump between machines and reconnect, attach to tmux and continue where I left off, but the performance is nice too.</p>



<a name="156619709"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/tricks%20for%20faster%20compiler%20compilation%20times/near/156619709" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/tricks.20for.20faster.20compiler.20compilation.20times.html#156619709">(Jan 22 2019 at 16:52)</a>:</h4>
<p><span class="user-mention" data-user-id="116107">@davidtwco</span> what dedicated server specifically?</p>



<a name="156619716"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/tricks%20for%20faster%20compiler%20compilation%20times/near/156619716" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/tricks.20for.20faster.20compiler.20compilation.20times.html#156619716">(Jan 22 2019 at 16:53)</a>:</h4>
<p>I've looked into that too</p>



<a name="156619719"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/tricks%20for%20faster%20compiler%20compilation%20times/near/156619719" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Zoxc <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/tricks.20for.20faster.20compiler.20compilation.20times.html#156619719">(Jan 22 2019 at 16:53)</a>:</h4>
<p>The 12 core will hopefully be a drop in replacement for R7 1700, which is what I'm on now</p>



<a name="156619750"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/tricks%20for%20faster%20compiler%20compilation%20times/near/156619750" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/tricks.20for.20faster.20compiler.20compilation.20times.html#156619750">(Jan 22 2019 at 16:53)</a>:</h4>
<p>From <a href="https://www.hetzner.com/?country=en" target="_blank" title="https://www.hetzner.com/?country=en">Hetzner</a>.</p>



<a name="156619891"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/tricks%20for%20faster%20compiler%20compilation%20times/near/156619891" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/tricks.20for.20faster.20compiler.20compilation.20times.html#156619891">(Jan 22 2019 at 16:54)</a>:</h4>
<blockquote>
<p>The 12 core will hopefully be a drop in replacement for R7 1700, which is what I'm on now</p>
</blockquote>
<p>the socket will be the same, but depending on your board the VRMs may be insufficient</p>



<a name="156619917"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/tricks%20for%20faster%20compiler%20compilation%20times/near/156619917" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/tricks.20for.20faster.20compiler.20compilation.20times.html#156619917">(Jan 22 2019 at 16:55)</a>:</h4>
<p>especially if a 16-core is released and you decided to step up to that</p>



<a name="156619950"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/tricks%20for%20faster%20compiler%20compilation%20times/near/156619950" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Zoxc <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/tricks.20for.20faster.20compiler.20compilation.20times.html#156619950">(Jan 22 2019 at 16:55)</a>:</h4>
<p>That's why I'm eyeing the 12 core instead =P</p>



<a name="156620000"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/tricks%20for%20faster%20compiler%20compilation%20times/near/156620000" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/tricks.20for.20faster.20compiler.20compilation.20times.html#156620000">(Jan 22 2019 at 16:56)</a>:</h4>
<blockquote>
<p>That's why I'm eyeing the 12 core instead =P</p>
</blockquote>
<p>what’s your board?</p>



<a name="156620151"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/tricks%20for%20faster%20compiler%20compilation%20times/near/156620151" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Zoxc <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/tricks.20for.20faster.20compiler.20compilation.20times.html#156620151">(Jan 22 2019 at 16:58)</a>:</h4>
<p>ASUS PRIME X370-PRO</p>



<a name="156620168"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/tricks%20for%20faster%20compiler%20compilation%20times/near/156620168" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/tricks.20for.20faster.20compiler.20compilation.20times.html#156620168">(Jan 22 2019 at 16:58)</a>:</h4>
<p>re: <code>--keep-stage</code>, another pattern that works is:</p>
<div class="codehilite"><pre><span></span>./x.py build -i src/libstd # first time
./x.py build -i src/libstd --keep-stage 0 # second, third, etc time
</pre></div>



<a name="156620186"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/tricks%20for%20faster%20compiler%20compilation%20times/near/156620186" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/tricks.20for.20faster.20compiler.20compilation.20times.html#156620186">(Jan 22 2019 at 16:58)</a>:</h4>
<p>you have to re-run the first command post rebase and/or if "weird stuff happens"</p>



<a name="156620220"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/tricks%20for%20faster%20compiler%20compilation%20times/near/156620220" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/tricks.20for.20faster.20compiler.20compilation.20times.html#156620220">(Jan 22 2019 at 16:59)</a>:</h4>
<p>(one thing I am very interested in is if we can come up with a way to make a safe version of <code>keep-stage</code>...)</p>



<a name="156620235"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/tricks%20for%20faster%20compiler%20compilation%20times/near/156620235" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/tricks.20for.20faster.20compiler.20compilation.20times.html#156620235">(Jan 22 2019 at 16:59)</a>:</h4>
<p>the plus-side of this pattern is that it gives you a fully functional compiler (not a stage1 version). The downside is it takes a bit longer.</p>



<a name="156644574"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/tricks%20for%20faster%20compiler%20compilation%20times/near/156644574" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Vadim Petrochenkov <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/tricks.20for.20faster.20compiler.20compilation.20times.html#156644574">(Jan 22 2019 at 22:10)</a>:</h4>
<blockquote>
<p>nagisa uses a widely known trick of a-lot-of-cores.</p>
</blockquote>
<p>This is how I solve the problem as well, more or less.<br>
SSD + CPU with good single-thread performance + many cores make world of difference.</p>



<a name="156644602"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/tricks%20for%20faster%20compiler%20compilation%20times/near/156644602" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Vadim Petrochenkov <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/tricks.20for.20faster.20compiler.20compilation.20times.html#156644602">(Jan 22 2019 at 22:11)</a>:</h4>
<p>I never use <code>--keep-stage</code> because it's not guaranteed to be correct.</p>



<a name="156644696"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/tricks%20for%20faster%20compiler%20compilation%20times/near/156644696" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Vadim Petrochenkov <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/tricks.20for.20faster.20compiler.20compilation.20times.html#156644696">(Jan 22 2019 at 22:12)</a>:</h4>
<p>I also usually build without debuginfo because "builds for running tests" happen much more often than "builds for getting a backtrace".</p>



<a name="156644913"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/tricks%20for%20faster%20compiler%20compilation%20times/near/156644913" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Vadim Petrochenkov <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/tricks.20for.20faster.20compiler.20compilation.20times.html#156644913">(Jan 22 2019 at 22:15)</a>:</h4>
<p>Oh, also <code>-C target-cpu=native</code>, although it made very little difference for rustc the last time I measured it (default -&gt; haswell).</p>



<a name="156645288"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/tricks%20for%20faster%20compiler%20compilation%20times/near/156645288" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Vadim Petrochenkov <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/tricks.20for.20faster.20compiler.20compilation.20times.html#156645288">(Jan 22 2019 at 22:20)</a>:</h4>
<p>Also disabling CPU hyper-threading helped in my case, IIRC.</p>



<a name="156645309"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/tricks%20for%20faster%20compiler%20compilation%20times/near/156645309" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Vadim Petrochenkov <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/tricks.20for.20faster.20compiler.20compilation.20times.html#156645309">(Jan 22 2019 at 22:21)</a>:</h4>
<p>(Need to remeasure this one though.)</p>



<a name="156677667"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/tricks%20for%20faster%20compiler%20compilation%20times/near/156677667" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/tricks.20for.20faster.20compiler.20compilation.20times.html#156677667">(Jan 23 2019 at 10:16)</a>:</h4>
<p>I remember being a bit disappointed when my shiny new 8C/16T R7 1700X was only slightly faster than 4C/8T Xeon in my laptop. Back then I concluded that single-thread performance was still key for a fast bootstrap. Although that was more than a year ago. Things might have changed a bit since then.</p>



<a name="156677718"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/tricks%20for%20faster%20compiler%20compilation%20times/near/156677718" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/tricks.20for.20faster.20compiler.20compilation.20times.html#156677718">(Jan 23 2019 at 10:17)</a>:</h4>
<p>and I certainly want to change things :) compiling the compiler should scale with the number of cores and not so much with clockspeeds.</p>



<a name="161747701"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/tricks%20for%20faster%20compiler%20compilation%20times/near/161747701" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/tricks.20for.20faster.20compiler.20compilation.20times.html#161747701">(Mar 26 2019 at 10:18)</a>:</h4>
<blockquote>
<p>Along the lines of the many cores trick. Has anyone tried compiling rust with sccache?</p>
</blockquote>
<p>I would definitely like to hear more about this. I read that <code>sccache</code> has (<em>experimental</em>) rust support. It would be pretty cool if we could apply it to the <code>rustc</code> builds in some fashion; I've used <code>ccache</code> for LLVM a lot in the past, but I'd like to see the idea generalized.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>